home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / kernel / Include / fsrecovTypes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-11  |  2.6 KB  |  80 lines

  1. /*
  2.  * fsrecovTypes.h --
  3.  *
  4.  *    Declarations of file handle recovery from recovery box.
  5.  *
  6.  * Copyright 1991 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that this copyright
  10.  * notice appears in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  * $Header: /sprite/src/kernel/Cvsroot/kernel/fsrecov/fsrecovTypes.h,v 1.1 92/08/10 17:32:58 mgbaker Exp $ SPRITE (Berkeley)
  16.  */
  17.  
  18. #ifndef _FSRECOV_TYPES
  19. #define _FSRECOV_TYPES
  20.  
  21.  
  22. /* constants */
  23.  
  24. /* data structures */
  25. /*
  26.  * The state in this structure corresponds mostly to the Fsio_FileReopenParams
  27.  * that was passed from clients to server during recovery.  It includes
  28.  * the stuff in the other types of reopen params as well (such as
  29.  * FsRmtDeviceReopenParams and StreamReopenParams).  If we keep this
  30.  * current, we should be able to recover without talking to the clients.
  31.  * The reopen params also included prefixID and flags fields that I
  32.  * don't think are necessary when doing it this way.
  33.  */
  34. typedef    struct    Fsrecov_HandleState {
  35.     Fs_FileID            fileID;        /* File or stream ID. */
  36.     Fs_FileID            otherID;    /* If the object is a stream,
  37.                          * then this is the id it
  38.                          * points to. */
  39.     Fsio_UseCounts        use;        /* How many references this
  40.                          * client has to the file. */
  41.     int                info;        /* For files: file version.
  42.                          * For pdevs: serverID.
  43.                              * For streams: all useFlags.
  44.                          * Otherwise unused. */
  45.     int                clientData;    /* For files: whether client
  46.                             * can cache or not.
  47.                          * For pdevs: seed.
  48.                          * For streams: offset.
  49.                          * Otherwise unused. */
  50. } Fsrecov_HandleState;
  51.  
  52. extern    Boolean    fsrecov_AlreadyInit;    /* We had a fast reboot. */
  53. extern    int    fsrecov_DebugLevel;    /* Print debugging info. */
  54. extern    Boolean    fsrecov_FromBox;    /* Do recovery from what's in the
  55.                      * recov box, even for old clients
  56.                      * that are doing reopens. */
  57.  
  58. /*
  59.  * Stuff for testing and timing recovery and the recovery box operations.
  60.  */
  61. extern    Time    fsrecov_StartRebuild;
  62. extern    Time    fsrecov_ReturnedObjs;
  63. extern    Time    fsrecov_BuiltHashTable;
  64. extern    Time    fsrecov_BuiltIOHandles;
  65. extern    Time    fsrecov_EndRebuild;
  66. extern    int    fsrecov_RebuildNumObjs;
  67.  
  68. typedef struct Fsrecov_DirLog {
  69.     int        nextLogSeqNum;
  70.     int        oldestEntry;
  71. } Fsrecov_DirLog;
  72.  
  73. typedef struct    DirEntryMap {
  74.     int        objectNum;
  75.     int        timeStamp;
  76. } DirEntryMap;
  77.  
  78.  
  79. #endif /* _FSRECOV_TYPES */
  80.